package prototype.sheep;

/**
 * @program: DesignModeProject
 * @description:
 * @author: Li canzhang
 * @create: 2022-05-09 10:53
 **/
public class Client {
    public static void main(String[] args) {
        Sheep sheep = new Sheep("多莉",1);
        sheep.setFriend(new Sheep("梦多",1));
        Sheep clone1 = sheep.clone();
        Sheep clone2 = sheep.clone();
        Sheep clone3 = sheep.clone();
        Sheep clone4 = sheep.clone();

        System.out.println(sheep + "--------" + sheep.hashCode() + "------------" + sheep.getFriend().hashCode());
        System.out.println(clone1 + "-------------" + clone1.hashCode() + "------------" + clone1.getFriend().hashCode());
        System.out.println(clone2 + "-------------" + clone2.hashCode() + "------------" + clone2.getFriend().hashCode());
        System.out.println(clone3 + "-------------" + clone3.hashCode() + "------------" + clone3.getFriend().hashCode());
        System.out.println(clone4 + "-------------" + clone4.hashCode() + "------------" + clone4.getFriend().hashCode());
    }
}
